package edu.hawaii.client;

import java.util.List;

import com.google.gwt.user.client.rpc.RemoteService;

/**
 * Asynchronous version of the GetDataService interface.  It is required by
 * GWT.  Otherwise, the application won't work.
 * 
 * @author Kiet Huynh
 * @author brandon lee
 */
public interface GetDataService extends RemoteService {
  
  
  /**
   * Calls the stored procedure "ReportServer_ShortCourseNamesBySemesterAndCampus_proc"
   * and returns the course names as the Java bean CourseNameByCampus objects.  
   * The course names returned depend on the selected campus and semester.
   * 
   * @param campus The name of the campus at which the courses are offered. It consists
   *        of the first 3 characters of the campus. For example, MAN for Manoa, HON for 
   *        Honolulu Community Colloge, etc...
   * @param semester The semester in which the courses are offered.  It consists of 6 
   *        digits.  The first 4 digits are the year, and the last 2 are the semester.
   *        For example, 200730 is the Spring 2007.
   * @return A list of CourseNameByCampus objects.
   */
  List getCourseNameByCampus(String campus,
      String semester);

  /**
   * Calls the stored procudure 
   * "dbo.ReportServer_EnrollmentManagement_ViewAvailableSeatsBySection_proc"
   * and returns the results as a list of objects.
   * It fullfils the search for available seats by section.
   * 
   * @param levelOfCourse All courses under this level will be returned.  For example, 
   *        if it is 500, all undergraduate courses will be returned.
   * @param campus The name of the campus at which the courses are offered. It consists
   *        of the first 3 characters of the campus. For example, MAN for Manoa, HON for 
   *        Honolulu Community Colloge, etc...
   * @param semester The semester in which the courses are offered.  It consists of 6 
   *        digits.  The first 4 digits are the year, and the last 2 are the semester.
   *        For example, 200730 is the Spring 2007.
   * @param school The school in which the courses are offered. It consists of 2 digits. 
   *        Use % for the wildcard. For example, 10 is for Art and Science.
   * @param maxCurrentEnrollment The maximum current enrollment in a course.  For example,
   *        if 15 is entered, all the courses that have current enrollment of 15 or less 
   *        will be returned. 
   * @param courseName  The name of a course. It uses the University of Hawaii naming 
   *        convention. User % for the wildcard. For example, ICS for Information 
   *        Computer Science. 
   * @param division Not sure at this moment. Use % for the wildcard.
   * @return A list of AvailableSeatsBySectionObjects which represent records returned 
   * by the stored procedures.
   */
  List getAvailableSeatsBySection(String levelOfCourse, String campus, 
                String semester, String school, int maxCurrentEnrollment, 
                String courseName, String division);
  
  /**
   * Calls the stored procudure dbo.ReportServer_Semester_proc to get 
   * the semester text and the semester key.
   * @param campus The first 3 letters of the campus name.  For example, MAN for Manoa, HON 
   * for Honolulu Community College.
   * @return A list of Semester object.
   */
  List getSemester(String campus);
  
  /**
   * Calls the stored procedure "ReportServer_SubjectsFilteredByAttributes_proc"
   * and returns the course names as the Java bean CourseNameByCampus objects.  
   * The subjects returned depending on the selected campus, semester, and attributes.
   * 
   * @param campus The name of the campus at which the courses are offered. It consists
   *        of the first 3 characters of the campus. For example, MAN for Manoa, HON for 
   *        Honolulu Community Colloge, etc...
   * @param semester The semester in which the courses are offered.  It consists of 6 
   *        digits.  The first 4 digits are the year, and the last 2 are the semester.
   *        For example, 200730 is the Spring 2007.
   * @param attributes The attributes of a course such as DS, DB, WI, OC.
   * @return A list of SubjectFilteredByAttributes objects.
   */
  List getSubjectFilteredByAttributes(String campus, String semester, String attributes);
  
  /**
   * Executes the stored procudure 
   * "dbo.ReportServer_SearchCoursesByAttributes_proc"
   * and returns the results as a list of AvailableSeatsBySection objects.
   * 
   * @param levelOfCourse All courses under this level will be returned.  For example, 
   *        if it is 500, all undergraduate courses will be returned.
   * @param campus The name of the campus at which the courses are offered. It consists
   *        of the first 3 characters of the campus. For example, MAN for Manoa, HON for 
   *        Honolulu Community Colloge, etc...
   * @param semester The semester in which the courses are offered.  It consists of 6 
   *        digits.  The first 4 digits are the year, and the last 2 are the semester.
   *        For example, 200730 is the Spring 2007.
   * @param school The school in which the courses are offered. It consists of 2 digits. 
   *        Use % for the wildcard. For example, 10 is for Arts and Science.
   * @param maxCurrentEnrollment The maximum current enrollment in a course.  For example,
   *        if 15 is entered, all the courses that have current enrollment of 15 or less 
   *        will be returned. 
   * @param courseName  The name of a course. It uses the University of Hawaii naming 
   *        convention. User % for the wildcard. For example, ICS for Information 
   *        Computer Science. 
   * @param division Not sure at this moment. Use % for the wildcard.
   * @param attribute The attributes of a course such as DS, DB, WI, OC.
   * @return A list of AvailableSeatsBySectionObjects which represent records returned 
   * by the stored procedures.
   */
  List getSearchCoursesByAttributes(String levelOfCourse, String campus, 
      String semester, String school, int maxCurrentEnrollment, 
      String courseName, String division, String attribute);
}

